package com.sky.mapper;

import com.sky.anno.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

@Mapper
public interface FlavorMapper {

    void saveFlavor(List<DishFlavor> flavors);

    @Delete("DELETE FROM dish_flavor WHERE dish_id=#{id}")
    void deleteFlavor(Long id);

    /**
     * 回显口味数据
     *
     * @param id
     * @return
     */
    List<DishFlavor> getById(Long id);
}
